<?php
    
    error_reporting(E_ERROR | E_WARNING | E_PARSE);
    

    define('DS', DIRECTORY_SEPARATOR);
    define('PATH_FRM', dirname(__FILE__) );
    define('PATH_TEMP', PATH_FRM . DS . 'temp' . DS );
    define('PATH_SITE', PATH_FRM . DS . '..' . DS );

    require_once PATH_FRM . DS . 'Log.php';
    require_once PATH_FRM . DS . 'Loader.php';
    require_once PATH_FRM . DS . 'Environment.php';
    require_once PATH_FRM . DS . 'DB.php';

    define('ENVIRONMENT',strtolower(Ftl_Environment::detect()));

    require_once PATH_FRM . DS . 'Environment' . DS . 'Config-' . ENVIRONMENT . '.php';

    Ftl_Loader::getInstance();

    $_GET       = Ftl_ArrayUtil::map( $_GET , 'stripslashes' );
    $_POST      = Ftl_ArrayUtil::map( $_POST , 'stripslashes' );
    $_COOKIE    = Ftl_ArrayUtil::map( $_COOKIE , 'stripslashes' );
    $_REQUEST   = Ftl_ArrayUtil::map( $_REQUEST , 'stripslashes' );


    if ( !defined( 'PATH_UPLOADS' ) )       define( 'PATH_UPLOADS' , PATH_SITE . 'uploads');


    if ( !defined( 'DB_TYPE' ) )            define( 'DB_TYPE' , Ftl_DB::MySql);
    if ( !defined( 'DB_USE_CACHE' ) )       define( 'DB_USE_CACHE' , false);
    if ( !defined( 'DB_PATH_CACHE' ) )      define('DB_PATH_CACHE',PATH_TEMP . 'db' . DS);
    if ( !defined( 'DB_TIMEOUT_CACHE' ) )   define('DB_TIMEOUT_CACHE',24);//horas

?>
